#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "./include/stu.h"

void manage_s();
void enter_s();
void enter_sk();
void enter_sf();
void insert_s();
void change_s();
void delete_s();
void findbyid_s();
void findbyname_s();
void show_s();

void manage_c();
void enter_c();
void enter_ck();
void enter_cf();
void insert_c();
void change_c();
void delete_c();
void findbyid_c();
void findbyname_c();
void show_c();

void selectcourse();
void updatedata();
int findscore(int id);
void store_s();
void store_c();

int main(){

    int n;
    
    enter_c();
    enter_s();
    printf("欢迎使用选课系统\n");
    while(1){
    	system("clear");
        printf("1：学生信息管理\n");
        printf("2：课程管理\n");
        printf("3：选课\n");
        printf("4：退出\n\n");
        scanf("%d",&n);
        switch (n)
        {
			case (1):
				manage_s();
				break;
			case (2):
				manage_c();
				break;
			case (3): 
				selectcourse();
				break;
			default:
				break;
		}
        updatedata();
        store_s();
        store_c();

        if(n == 4) break;
    }

    return 0;
}

